<?php
/*
 * Created on 05.01.2006
 *
 */

/**
 * Creates param for use in c:url for doc id support
 */
class cms_docidparamHandler 
{

    function startElement (& $sender, $attrs)
    {
        $parent = $sender->topParent();
        if ($parent['tag'] != 'url')
            die ("Parent of param must be url and must have attribute var\n");
        $sender->appendCode('$'."__url->addParam('doc_id', \$actionform->getDocId());\n");        
    }
    
    function endElement (& $sender)
    {
    }

}

?>
